import { createStore } from 'vuex';
import createPersistedState from 'vuex-persistedstate'
import state from './state';
import actions from './actions'
import mutations from './mutations'
export default createStore({
    state,
    actions,
    mutations,
    // 配置vuex插件vuex-persistedstate
  plugins: [
    createPersistedState({
      // 默认存储在localStorage 现改为sessionStorage
      storage: window.localStorage
    })
  ]
})


